
<style>
	#file-avatar {
		opacity: 0;
		position: absolute;
		top: 0;
		left: 0;
		bottom: 0;
		right: 0;
		z-index: 9;
		background: red;
		width: 100%;
	}
	.fui-list-media img{
		border-radius: 50%;
	}
	.fui-list-media{
		margin-right: 0;
	}
	.fui-cell-group .fui-cell  .fui-cell-remark.down:after {
		-webkit-transform: rotate(135deg);
		-ms-transform: rotate(135deg);
		transform: rotate(135deg);
		top:-.1rem;
	}
</style>
<link rel="stylesheet" href="../addons/ewei_shopv2/template/mobile/default/static/css/rank.css">
<div class='fui-page  fui-page-current'>
    <div class="fui-header">
		<div class="fui-header-left">
			<a class="back" href="javascript:history.back();"></a>
		</div>
		<div class="title">玩家资料</div>
		<div class="fui-header-right">&nbsp;</div>
	</div>
	<div class='fui-content'>
		<div class="fui-list-group">
			<div class="fui-list" id="btn-avatar">
				<div class="fui-list-inner" style="color: #666;">我的头像</div>
				<div class="fui-list-media">
					<img ng-src="{{pagedata.playinfo.headImg}}"  id="headImg" readonly="readonly"/>
				</div>
				<div class="fui-list-angle">
					<div class="angle"></div>
				</div>
			</div>
		</div>
		<div class="fui-cell-group">
			<div class="fui-cell">
				<div class="fui-cell-label ">我的昵称</div>
				<div class="fui-cell-info"><input type="text" class='fui-input' id='name' name="name" placeholder="请输入您的昵称" value="{{pagedata.playinfo.name}}" readonly/></div>
			</div>
		</div>
		
			 
		<div class="fui-cell-group">
			<div class="fui-cell must ">
				<div class="fui-cell-label ">姓名</div>
				<div class="fui-cell-info c000"><input type="text" class='fui-input' id='realname'  name='realname' placeholder="请输入您的真实姓名"  value="{{pagedata.playinfo.ausername}}" /></div>
			</div>

		
				<div class="fui-cell must">
					<div class="fui-cell-label">手机号</div>
					<div class="fui-cell-info c000"><input type="text" class='fui-input' id='tel' name='tel' placeholder="请输入您的手机号"  value="{{pagedata.playinfo.tel}}" maxlength=11/></div>
				</div>

			
			<div class="fui-cell">
				<div class="fui-cell-label">微信号</div>
				<div class="fui-cell-info c000"><input type="text"  class='fui-input'  id='weixin' name='weixin' placeholder="请输入您的微信号"  value="{{pagedata.playinfo.weixin}}" /></div>
			</div>
			<div class="fui-cell must">
				<div class="fui-cell-label">联系地址</div>
				<div class="fui-cell-info c000"><input type="text"  class='fui-input'  id='address' name='address' placeholder="请输入您的地址"  value="{{pagedata.playinfo.address}}" /></div>
			</div>
		 
		</div>
		
		<a href="javascript:;" id='btn-submit' class='btn btn-danger block mtop' onclick="savePlayInfo()">确认提交</a>
	</div>

</div>
<script type="text/javascript">
	var rid = window.scope.pagedata.id;
	//  window.scope.pagedata.savePlayInfo=function() {
	function savePlayInfo(){
		//var headImg = document.getElementById("headImg").value;
		
		var name = document.getElementById("name").value;
		var tel = document.getElementById("tel").value;
		var ausername = document.getElementById("realname").value;
		var weixin = document.getElementById("weixin").value;
		var address = document.getElementById("address").value;
	
		if (!ausername) {
			alert('请输入您的真实姓名！');
			return false;
		}
		if (!tel) {
			alert('请输入您的手机号码！');
			return false;
		}
		if (tel.search(/^([0-9]{11})?$/) == -1) {
			alert('请输入正确的手机号码！');
			return false;
		}
		if (!address) {
			alert('请输入您的详细地址！');
			return false;
		}
		//tip("正在处理数据...");
	//	$.post('{php echo $this->createMobileUrl('address')}', {
		window.scope.post({},'post','ausername='+ausername+'&tel='+tel+'&headImg='+headImg+'&name='+name+'&weixin='+weixin+'&address='+address+'&rid='+rid,function(s){
	  // tip_close();
		if (s.message == 1) {
				alert('提交成功');
	       }else{
				alert('提交失败');
		   }
		});
	}


</script>

